<%@ page contentType="text/html;charset=UTF-8"%>
    <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
        <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
        <html>

        <head>
            <meta name="decorator" content="default" />
            <link rel="stylesheet" type="text/css" href="${ctxStatic}/IDH/css/shop/shopDispatchPrint.css">
            <script language="javascript" src="${ctxStatic}/jqprint/jquery.jqprint-0.3.js"></script>
            <script type="text/javascript">
                function printTable() {
                    $("#alltable").jqprint();
                }
            </script>
            <title>配货单</title>
        </head>

<body>
    <div class="content" id="alltable">
        <div class="col-xs-12">
            <span class="dTiltle">发货单</span>
        </div>
        <div class="col-xs-12">
            <table class="table table-bordered col-xs-12">
                <tr class="col-xs-12">
                    <td class="span6"><span>发货商家</span></td>
                    <td class="span6"><span>发货详情</span></td>
                </tr>
                <tr class="col-xs-12">
                    <td class="span6">
                        <div class="col-xs-12">霁圣商城</div>
                    </td>
                    <td class="span6">
                        <div class="col-xs-12"><label>快递单号：</label>${shopDispatch.code}</div>
                        <div class="col-xs-12"><label>订单号：</label>${shopDispatch.shopOrder.code}</div>
                        <div class="col-xs-12"><label>下单日期： </label>
                            <fmt:formatDate value="${shopDispatch.shopOrder.createTime}" pattern="yyyy-MM-dd hh:mm:ss"
                            />
                        </div>
                        <div class="col-xs-12"><label>配送方式： </label>${shopDispatch.company}</div>
                         <div class="col-xs-12"><label>备注： </label>${shopDispatch.comment}</div>
                    </td>
                </tr>
            </table>
            <table class="table table-bordered col-xs-12">
                <tr class="col-xs-12">
                    <td class="span12" colspan="3"><span>收货信息</span></td>
                </tr>
                <tr class="col-xs-12">
                    <td class="span2">
                        <span>收件人</span>
                    </td>
                    <td class="span2">
                        <span>联系电话</span>
                    </td>
                    <td class="span6">
                        <span>收货地址</span>
                    </td>
                </tr>
                <tr class="col-xs-12">
                    <td class="span2">
                        ${shopDispatch.name}
                    </td>
                    <td class="span2">
                        ${shopDispatch.telephone}
                    </td>
                    <td class="span6">
                        ${shopDispatch.address}
                    </td>
                </tr>
            </table>
            <table class="table table-bordered col-xs-12">
                <tr class="col-xs-12">
                    <td class="span3">
                        <span>商品名称</span>
                    </td>
                    <td class="span3">
                        <span>商品货号</span>
                    </td>
                    <td class="span2">
                        <span>数量</span>
                    </td>
                    <td class="span2">
                        <span>单价</span>
                    </td>
                    <td class="span2">
                        <span>小计</span>
                    </td>
                </tr>
                <c:forEach items="${shopDispatch.shopOrder.shopOrderInfoList}" var="shopDispatch">
                    <tr class="col-xs-12">
                        <td class="span3">
                            ${shopDispatch.name}
                        </td>
                        <td class="span3">
                            ${shopDispatch.code}
                        </td>
                        <td class="span2">
                            ${shopDispatch.count}
                        </td>
                        <td class="span2">
                            ${shopDispatch.price}
                        </td>
                        <td class="span2">
                            ${shopDispatch.price*shopDispatch.count}
                        </td>
                    </tr>
                </c:forEach>
                
		</table>
	</div>
</div>
<div class="text-center">
	<button onclick="printTable()" id="printBtn">打印</button>
	<button  value="返 回" onclick="history.go(-1)">返回</button>
</div>
</body>
</html>